package profit

import (
	"context"
	"git.mycaigou.com/gfyx/micro-gfyx-oppty-service/infrastructure/common/utils"
)

type ProfitRepositoryIface interface {
	CreateProfit(ctx context.Context, po *GfyxProfitPo) (*GfyxProfitPo, error)
	QueryAllEffectiveProfitList(ctx context.Context) ([]*GfyxProfitPo, error)
	UpdateProfit(ctx context.Context, condition, updates map[string]interface{}) error
	QueryEffectiveProfitListByCondition(ctx context.Context, condition map[string]interface{}, pageInfo *utils.PageInfo) (int64, []*GfyxProfitPo, error)
	ExistProfit(ctx context.Context, deliveryNo string, deliveryBatchNo string, deliveryAuthId string) (*GfyxProfitPo, error)

	CreateProfitAccount(ctx context.Context, po *GfyxProfitAccountPo) (*GfyxProfitAccountPo, error)
	QueryProfitAccount(ctx context.Context) (*GfyxProfitAccountPo, error)
	UpdateProfitAccount(ctx context.Context, condition, updates map[string]interface{}) error

	CreateProfitProvince(ctx context.Context, po *GfyxProfitProvincePo) (*GfyxProfitProvincePo, error)
	SaveProfitProvince(ctx context.Context, provinceCodes []string) error
	QueryProfitProvinceList(ctx context.Context) ([]*GfyxProfitProvincePo, error)
	QueryProfitProvinceListV2(ctx context.Context) ([]string, error)
	DeleteProfitProvince(ctx context.Context, condition map[string]interface{}) error
}
